// /plugins/directives.ts

import { defineNuxtPlugin } from '#app'

// 创建自定义指令
const vFocus = {
  mounted(el: HTMLElement) {
    el.focus()
  },
}

export default defineNuxtPlugin((nuxtApp) => {
  // 注册自定义指令
  nuxtApp.vueApp.directive('focus', vFocus)
})
